package mvc.until;

import java.lang.reflect.Field;

import javax.servlet.http.HttpServletRequest;

public class FullBean {

	public FullBean() {
		
	}
	public static  Object  full(HttpServletRequest request) {
		
		Object o=null;
		try{
			Class clazz = Class.forName(request.getParameter("sign"));
			o=clazz.newInstance();
			Field[] fields = clazz.getDeclaredFields();
			for (Field f : fields) {
				f.setAccessible(true);
				f.set(o, request.getParameter(f.getName()));
				f.setAccessible(false);
			}
		}catch(Exception e){
			e.printStackTrace();
		}
		return o;
		
		
	}
}
